using System;
using VisionarySystems.TimeRegi.Model.TimePeriods;

namespace VisionarySystems.TimeRegi.View.WorkTimeCalculator
{
    public interface IWorkTimeCalculator
    {
        /// <summary>
        /// Tells how long time the break per day is
        /// </summary>
        TimeSpan BreakPerDay { get; }

        /// <summary>
        /// Loads values directly from the database - Obsolite
        /// </summary>
        void LoadValues();

        void FillValues(ITimePeriode TimePeriode);

        /// <summary>
        /// Returns the work time in the period, with break time subtracted
        /// </summary>
        /// <param name="StartDate"></param>
        /// <param name="EndDate"></param>
        /// <param name="AddDaysOff"></param>
        /// <returns></returns>
		TimeSpan GetTime(DateTime StartDate, DateTime EndDate, bool AddDaysOff = false, bool RemoveBreakTime = true);
        
        /// <summary>
        /// Tells how many hours to work on a specific day
        /// </summary>
        /// <param name="TheDay"></param>
        /// <returns></returns>
        TimeSpan ExpectedWorkHoursPerDay(DayOfWeek TheDay);
        
        /// <summary>
        /// Adds a day to the calculator
        /// </summary>
        /// <param name="ThisDate"></param>
        /// <param name="Value"></param>
        void AddDay(DateTime ThisDate, TimeSpan Value);
        
        /// <summary>
        /// Clears all values in the Calculator
        /// </summary>
        void Clear();
        
        /// <summary>
        /// Returns the Breaktime for a specified date, not calculating, if work was done on that day or not
        /// </summary>
        /// <param name="ThisDate"></param>
        /// <returns></returns>
        TimeSpan GetBreakTime(DateTime ThisDate);

	    TimeSpan GetOverTime();
    }
}